package com.deng.springboot.demo.web.controller;

import com.deng.springboot.demo.web.model.vo.ResponseResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

/**
 * @author 邓力宾
 * @date 2020/3/1114:21
 * @Description: 错误提示接口
 */
@RestController
@RequestMapping("/error")
@ApiIgnore
public class ErrorController extends BaseController {

    @GetMapping("/404")
    public ResponseResult<Object> error404(){
        return new ResponseResult<>(404, "接口不存在", null);
    }
    @GetMapping("/403")
    public ResponseResult<Object> error403(){
        return new ResponseResult<>(403, "禁止访问", null);
    }
    @GetMapping("/500")
    public ResponseResult<Object> error500(){
        return new ResponseResult<>(500, "内部错误", null);
    }
}
